/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2024-10-08 09:31:44
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2025-02-28 10:10:17
 * @FilePath: /xhs-mom-new/src/api/order/purchase/order.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
// 列表
export function GetListAPI(params) {
  return request({
    url: '/order/purchase-order/list',
    method: 'GET',
    params
  })
}

// 计划确认
export function PlanConfirmationAPI(data) {
  return request({
    url: '/order/purchase-order/planConfirmation',
    method: 'POST',
    data
  })
}

// 新增
export function saveOrderAPI(data) {
  return request({
    url: '/order/purchase-order/saveOrder',
    method: 'POST',
    data
  })
}

// 采购下单
export function PlaceOrderAPI(data) {
  return request({
    url: '/order/purchase-order/placeOrder',
    method: 'POST',
    data
  })
}

// 提交审核
export function SubmitReviewAPI(data) {
  return request({
    url: '/order/purchase-order/submitReview',
    method: 'POST',
    data
  })
}

// 撤销审核
export function DeleteReviewAPI(data) {
  return request({
    url: '/order/purchase-order/deleteReview/' + data,
    method: 'GET'
  })
}

// 关结
export function CloseReviewAPI(data) {
  return request({
    url: '/order/purchase-order/closeReview',
    method: 'POST',
    data
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/order/purchase-order/updateOrder',
    method: 'POST',
    data
  })
}

// 复制
export function copySaveAPI(data) {
  return request({
    url: '/order/purchase-order/copySave',
    method: 'POST',
    data
  })
}

// 查看详情
export function DetailDataAPI(data) {
  return request({
    url: '/order/purchase-order/view/' + data,
    method: 'GET'
  })
}

// 审核
export function ToExamineAPI(data) {
  return request({
    url: '/order/purchase-order/purchaseOrderReview',
    method: 'POST',
    data
  })
}

// 批次到货回显
export function getBatchArrivalListAPI(data) {
  return request({
    url: '/order/purchase-order/getBatchArrivalList/' + data,
    method: 'GET'
  })
}

// 批次到货
export function BatchArrivalAPI(data) {
  return request({
    url: '/order/purchase-order/batchArrival',
    method: 'POST',
    data
  })
}

// 采购下单多条回显
export function getPurchaseOrderEchoAPI(data) {
  return request({
    url: '/order/purchase-order/getPurchaseOrderEcho/' + data,
    method: 'GET'
  })
}

// 采购订单复制回显
export function getCopyViewAPI(params) {
  return request({
    url: '/order/purchase-order/copyView',
    method: 'GET',
    params
  })
}

// 金蝶数据推送
export function pushAPI(data) {
  return request({
    url: '/order/purchase-order/push',
    method: 'PUT',
    data
  })
}

// 采购订单供应商带出单价
export function getPurchaseOrderEchoBySupplierAPI(params) {
  return request({
    url: '/order/purchase-order/getPurchaseOrderEchoBySupplier',
    method: 'GET',
    params
  })
}
